#include "SMPPAlertOnMessageDelivery.hpp"

using namespace smpp::pdu;

AlertOnMessageDelivery::AlertOnMessageDelivery(const octetString &nValue):
TLV(TLVtags::TAG_ALERT_ON_MESSAGE_DELIVERY,nValue.size()),_Value(nValue){}

AlertOnMessageDelivery::AlertOnMessageDelivery(
const AlertOnMessageDelivery &nAlertOnMessageDelivery):
TLV(nAlertOnMessageDelivery),_Value(nAlertOnMessageDelivery.getValue()){}

bool AlertOnMessageDelivery::operator ==(
	const AlertOnMessageDelivery &nAlertOnMessageDelivery) const{
	return (TLV::operator == (nAlertOnMessageDelivery) && 
			_Value == nAlertOnMessageDelivery.getValue());
}

bool AlertOnMessageDelivery::operator !=(
	const AlertOnMessageDelivery &nAlertOnMessageDelivery) const{
	return !this->operator == (nAlertOnMessageDelivery);
}

AlertOnMessageDelivery &AlertOnMessageDelivery::operator =(
	const AlertOnMessageDelivery &nAlertOnMessageDelivery){
	if(*this == nAlertOnMessageDelivery)
		return *this;
	TLV::operator = (nAlertOnMessageDelivery);
	_Value = nAlertOnMessageDelivery.getValue();
	return *this;
}

void AlertOnMessageDelivery::setValue(const octetString &nValue){
	_Value = nValue;
}

const octetString &AlertOnMessageDelivery::getValue() const{
	return _Value;
}
